/**
 * 作者: wgx
 * 日期: 2024-12-05 09:21:04
 * 备注: 通用的榜单奖励配置表
 */
package com.motu.monstercity.server.game.commondata.rank;

import io.vertx.core.json.JsonObject;

public class RankRewardModel {
    protected int id; // id
    protected int rankType; // 榜单类型
    protected int groupId; // 分组ID
    protected int rankMin; // 最小排名
    protected int rankMax; // 最大排名
    protected String reward; // 奖励
    protected String reward2; // 成员奖励

    public RankRewardModel() {
    }

    public RankRewardModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        rankType = obj.containsKey("rank_type") ? obj.getInteger("rank_type") : 0;
        groupId = obj.containsKey("group_id") ? obj.getInteger("group_id") : 0;
        rankMin = obj.containsKey("rank_min") ? obj.getInteger("rank_min") : 0;
        rankMax = obj.containsKey("rank_max") ? obj.getInteger("rank_max") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
        reward2 = obj.containsKey("reward2") ? obj.getString("reward2") : "";
    }

    public int getId() {
        return id;
    }

    public int getRankType() {
        return rankType;
    }

    public int getGroupId() {
        return groupId;
    }

    public int getRankMin() {
        return rankMin;
    }

    public int getRankMax() {
        return rankMax;
    }

    public String getReward() {
        return reward;
    }

    public String getReward2() {
        return reward2;
    }

}
